package cn.edu.njtc.common;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;

@Setter
@Getter
@NoArgsConstructor
@AllArgsConstructor
public class Records<T> implements Serializable {

    private Long total;
    private T data;

    public static <T> Records<T> pack(Long total,T t) {
        Records<T> r = new Records<>();
        r.setData(t);
        r.setTotal(total);
        return r;
    }


}
